﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Diagnostics;

namespace MayhemCore
{
    /// <summary>
    /// Helper methods for Event and Reaction lists
    /// </summary>
    /// <typeparam name="T">EventBase or ReactionBase</typeparam>
    /// <typeparam name="V">The interface type that modules must implement</typeparam>
    public abstract class ModuleList<T> : List<ModuleType>
    {
        public ModuleList()
        {
        }

        public Type[] ToTypeArray()
        {
            List<Type> types = new List<Type>();
            foreach (ModuleType moduleType in this) {
                types.Add(moduleType.Type);
            }
            return types.ToArray();
        }
    }
}
